<?php

namespace app\api\validate;

use think\Validate;

/**
 * 巡查子表
 */
class PatrolChildValidate extends Validate
{

    protected $rule = [
        'patrol_id' => 'require',
        'patrol_inspection_id' => 'require',
        'id' => 'require',
        'images' => 'require',
        'endstatus' => 'require|in:2,3',
        'startime' => 'require',
    ];

    protected $message = [
        'patrol_id.require' => '未知巡查计划',
        'patrol_inspection_id.require' => '未知巡查街道',
        'id.require' => '未知巡查点',
        'images.require' => '请上传巡检图片',
        'endstatus.require' => '未知状态',
        'endstatus.in' => '未知状态',
        'startime.require' => '请选择巡查开始时间',
    ];

    protected $scene = [
        'list' => ['patrol_id','patrol_inspection_id'],
        'save_submit' => ['id','images','endstatus','startime'],

    ];
}